package com.ezops.poc.bo;

/**
 * Status of trades.
 * 
 * @author vgaurav
 * 
 */
public enum TradeStatus {

	PENDING(0), PROCESSED(1), FAILED(2);

	private int status;

	TradeStatus(int statusId) {
		this.status = statusId;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public static TradeStatus valueOf(int status) {
		for (TradeStatus tradeStats : TradeStatus.values()) {
			if (tradeStats.getStatus() == status)
				return tradeStats;
		}
		return null;
	}

}
